<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html" 
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
        <f:view contracts="#{themeSwitcher.theme}" >       
            <ui:composition template="/template.xhtml">

                <ui:define name="content">    
                    <h1>Resource Library Contracts</h1>
                    <p>Current Theme: #{themeSwitcher.theme}</p>
                    <h:form>
                        <h:commandButton value="Default Theme" action="#{themeSwitcher.changeTheme('default')}">
                        </h:commandButton>    
                        <h:commandButton value="Alternative Theme" action="#{themeSwitcher.changeTheme('alternative')}">
                        </h:commandButton>    
                    </h:form>
                    <p>
                        <ul>
                            <li>
                                <a href="themed-alt/index.faces">Contracts alternative in faces-config.xml</a>
                            </li>
                              <li>
                                <a href="themed-default/index.faces">Contracts default in faces-config.xml</a>[Does not work as expected]
                            </li>
                             <li>
                                <a href="themed-dyn/index.faces">Contracts was changed dynamically in faces-config.xml</a> [Not available in JSF 2.2]
                            </li>
                        </ul>
                        
                    </p>
                </ui:define>
            </ui:composition>
        </f:view>
</html>
